import Cookies from 'js-cookie'

const EXP = 7
const TokenKey = 'token'
const rememberKey = 'remember-info'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token, { expires: EXP, })
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getRemember() {
  return Cookies.get(rememberKey)
}

export function setRemember(info) {
  return Cookies.set(rememberKey, info, { expires: EXP, })
}

export function removeRemember() {
  return Cookies.remove(rememberKey)
}